package com.bestcem.xm.deliver.mq.receiver.biz;

import com.alibaba.fastjson.JSONObject;
import com.bestcem.xm.deliver.mq.dto.*;
import org.springframework.messaging.support.GenericMessage;

import java.util.function.Consumer;

public interface DeliverConsumers {
    /**
     * 公众号投放消费者，立即投放和延迟投放都会到这里
     * 立即投放原来是异步多线程，只能在一台机器上执行，太慢了
     * 弄成mq消息，分批次发送，消费
     * 比如投放5w个,1w一个mq消息,3台机器，只需要2轮
     */
    Consumer<GenericMessage<WechatmpDeliverMessageDto>> wechatmpDeliver();

    /**
     * 邮件投放消费者，立即投放和延迟投放都会到这里
     */
    Consumer<GenericMessage<EmailDeliverMessageDto>> emailDeliver();

    /**
     * 短信投放消费者，立即投放和延迟投放都会到这里
     */
    Consumer<GenericMessage<SmsDeliverMessageDto>> smsDeliver();

    Consumer<GenericMessage<CustomDeliverLinkMessageDto>> saveCustomDeliverLink();

    Consumer<GenericMessage<CreateProjectDto>> qdesProjectCreated();

    Consumer<GenericMessage<DeleteProjectDto>> projectDeleted();

    Consumer<GenericMessage<JSONObject>> projectQuestionDelete();

    Consumer<GenericMessage<JSONObject>> deliverSurveyRespondentSubmit();

    Consumer<GenericMessage<JSONObject>> deliverSurveyRespondentUnfinish();

    Consumer<GenericMessage<JSONObject>> defaultDeliverStoreInvalidate();

    Consumer<GenericMessage<JSONObject>> userGroupTitleModifyList();

    Consumer<GenericMessage<JSONObject>> userNewStoreList();

    Consumer<GenericMessage<JSONObject>> userGroupInvalidate();

    Consumer<GenericMessage<OpenplatformExtParamUpdateDto>> extparamUpdate();

    Consumer<GenericMessage<OpenplatformExtParamUpdateDto>> deliverSurveyExtVersionUpdate();

    Consumer<GenericMessage<JSONObject>> surveyRespondentSync();
}
